package com.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 张杰
 * Date: 2022-07-23
 * Time: 10:26
 */
@Controller
public class UserController {
    /*public void sayHi() {
        System.out.println("你好,UserController.");
    }*/

    //对象注入方式1:属性注入
    @Autowired
    private UserService userService;
    public void sayHi() {
        userService.sayHi();
    }
}
